<!DOCTYPE html>
<html>
  <head>
    <title>Hello kotlin</title>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
    <script type="text/javascript" charset="utf-8" src="js/kotlin.js"></script>
  </head>
  <body onload="main()">
    <p><button id="hello-kotlin">Hello, Kotlin!</button></p>

    <p>This application was compiled by TeaVM from the following Kotlin source:</p>
    <pre>
package org.teavm.samples.kotlin

import org.teavm.jso.browser.*

fun main(args : Array&lt;String>) {
    val document = Window.current().document;

    document.getElementById("hello-kotlin").addEventListener("click") { Window.alert("Hello, developer!") }
}
    </pre>
  </body>
</html>